//
//  HJumpViewController.m
//  Router
//
//  Created by James on 2017/2/7.
//  Copyright © 2017年 James. All rights reserved.
//

#import "HJumpViewController.h"
@interface HJumpViewController ()

@end

@implementation HJumpViewController

+(void)load {
    [self registerRoute:kRouteCeShi withHandler:^BOOL(NSDictionary *parameters) {
        NSString *doctorID = parameters[@"doctorID"];
        HJumpViewController *vc = [[HJumpViewController alloc]init];
        vc.title = @"跳转测试";
        vc.hidesBottomBarWhenPushed = YES;
        [[UIViewController topViewController].navigationController pushViewController:vc animated:YES];
        return YES;
    }];
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(0, NavBarHeight, 120, 120)];
    button.backgroundColor = [UIColor redColor];
    [[button rac_signalForControlEvents:UIControlEventTouchUpInside]subscribeNext:^(id x) {
        [[NSNotificationCenter defaultCenter]postNotificationName:kWNotificationCeShi object:nil];
        [self.navigationController popViewControllerAnimated:YES];
    }];
    [self.view addSubview:button];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
